<?php if($countVideos) : ?>
	<div class="u_cat">
		<div class="u_cat_head_strip"></div>
		<div class="u_cat_head"><a href="<?php echo Yii::app()->createUrl('video/index', array('profile'=>$_GET['id']));?>"><em>Видеозаписи</em><span><?php echo CHtml::encode($countVideos); ?></span></a></div>
		<div class="u_cat_media video">
			<?php foreach ($videos as $key => $video){ ?>
				<?php $class = (!$key) ? 'u_media' : 'u_media hidden'; ?>
				<a href="<?php echo Yii::app()->createUrl('video/view', array('id'=>$video->id, 'profile'=>Yii::app()->request->getParam('id')));?>" class="<?php echo $class; ?>" id="video_<?php echo ($key+1);?>">
					<img src="<?php echo VideoPreview::getVideoPreview($video->video->code); ?>" width="180" height="107" border="0" alt="" />
					<div class="play"></div>
					<div class="mask"></div>					
				</a>
			<?php } ?>	
			<div class="u_media_nav">
				<div class="u_media_nav_prev"></div>
				<div class="u_media_nav_next"></div>
				<?php foreach ($videos as $key => $video){ ?>
					<?php $class = (!$key) ? 'u_media_nav_name' : 'u_media_nav_name hidden'; ?>
					<a href="<?php echo Yii::app()->createUrl('video/view', array('id'=>$video->id, 'profile'=>Yii::app()->request->getParam('id')));?>" class="<?php echo $class; ?>" id="video_<?php echo ($key+1);?>_"><?php echo CHtml::encode($video->name); ?></a>
				<?php } ?>
			</div>
		</div>
	</div>
<?php elseif (Yii::app()->request->getParam('id') == Yii::app()->user->id) : ?>
	<div class="u_cat">
		<div class="u_cat_head_strip"></div>
		<div class="u_cat_head">
			<a href="<?php echo Yii::app()->createUrl('video/index', array('profile'=>$_GET['id']));?>">
				<em>Видеозаписи</em><span><?php echo CHtml::encode($countVideos); ?></span>
			</a>
		</div>
		<div class="u_cont_list">
			<div class="u_cont">
				<div class="u_cont_r_empty ajaxLinks">
					У вас нету видео.
					<p><a href="<?php echo Yii::app()->createUrl('video/create', array('profile'=>Yii::app()->request->getParam('id')));?>" class="u_cont_h2_discussion ajaxLink">
						Добавить 
					</a></p>
				</div>
			</div>
		</div>
	</div>
<?php endif; ?>